package com.baidu.yyb.bean;

/**
 * 笔记相关数据
 * @author LiuTong
 */
public class NoteData {
    private UserData mUserData;
    private String mNoteId;
    private String mNoteTitle;
    private String mNoteContent;
    private int mNoteType;
    private boolean isDelete;
    private boolean isCollect;
    private boolean isTodo;
    private NoteData(Builder builder){
        this.mUserData = builder.userData;
        this.mNoteId = builder.noteId;
        this.mNoteTitle = builder.noteTitle;
        this.mNoteContent = builder.noteContent;
        this.mNoteType = builder.noteType;
        this.isDelete = builder.isCollect;
        this.isCollect = builder.isCollect;
        this.isTodo = builder.isTodo;
    }

    public UserData getUserData() {
        return mUserData;
    }


    public String getNoteId() {
        return mNoteId;
    }



    public String getNoteTitle() {
        return mNoteTitle;
    }

    public String getNoteContent() {
        return mNoteContent;
    }



    public int getNoteType() {
        return mNoteType;
    }



    public boolean isDelete() {
        return isDelete;
    }



    public boolean isCollect() {
        return isCollect;
    }



    public boolean isTodo() {
        return isTodo;
    }


    static class Builder{
        private UserData userData;
        private String noteId;
        private String noteTitle;
        private String noteContent;
        private int noteType;
        private boolean isDelete = false;
        private boolean isCollect = false;
        private boolean isTodo = false;

        public Builder(String noteId,String noteContent,int noteType){
            this.noteId = noteId;
            this.noteContent = noteContent;
            this.noteType = noteType;
        }

        public Builder setNoteTile(String noteTitle){
            this.noteTitle = noteTitle;
            return this;
        }

        public Builder setUserData(UserData userData){
            this.userData = userData;
            return this;
        }

        public Builder setIsDelete(boolean isDelete){
            this.isDelete = isDelete;
            return this;
        }

        public Builder setIsCollect(boolean isCollect){
            this.isCollect = isCollect;
            return this;
        }
        public Builder setIsToDo(boolean isTodo){
            this.isTodo = isTodo;
            return this;
        }
        public NoteData build(){
            return new NoteData(this);
        }
    }
}
